<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .box{
        width: 500px;
        height: 200px;
        
    }
    img{
        width: 100px;
        height: 150px;
        opacity: 50% 50%;
    }
</style>
<body>
    <div class="box">
        <img src="./src=http___c-ssl.duitang.com_uploads_blog_202106_11_20210611205456_7878c.jpg&refer=http___c-ssl.duitang.webp" alt="">
    <img src="./src=http___c-ssl.duitang.com_uploads_blog_202106_11_20210611205456_7878c.jpg&refer=http___c-ssl.duitang.webp" alt="">
    <img src="./src=http___c-ssl.duitang.com_uploads_blog_202106_11_20210611205456_7878c.jpg&refer=http___c-ssl.duitang.webp" alt="">
    <img src="./src=http___c-ssl.duitang.com_uploads_blog_202106_11_20210611205456_7878c.jpg&refer=http___c-ssl.duitang.webp" alt="">
    <img src="./src=http___c-ssl.duitang.com_uploads_blog_202106_11_20210611205456_7878c.jpg&refer=http___c-ssl.duitang.webp" alt="">
    <img src="./src=http___c-ssl.duitang.com_uploads_blog_202106_11_20210611205456_7878c.jpg&refer=http___c-ssl.duitang.webp" alt="">
    <img src="./src=http___c-ssl.duitang.com_uploads_blog_202106_11_20210611205456_7878c.jpg&refer=http___c-ssl.duitang.webp" alt="">
    <img src="./src=http___c-ssl.duitang.com_uploads_blog_202106_11_20210611205456_7878c.jpg&refer=http___c-ssl.duitang.webp" alt="">
    </div>
</body>
<script>
    var imgs=document.querySelectorAll('img')
    for(let i=0;i<imgs.length;i++){
        imgs[i].onmousemove=function(){
            imgs[i].style.opacity='0.2'
        }
        imgs[i].onmouseout=function(){
            imgs[i].style.opacity='1'
        }
    }
    
</script>
</html>